package com.haikesi.api.devicetype.domain.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
public class DeviceTypeSearchVO implements Serializable {

    private static final long serialVersionUID = -1L;

    @ApiModelProperty(value = "设备类型别名")
    private String deviceTypeAlias;

    @ApiModelProperty(value = "设备类型名称")
    private String deviceTypeName;

    @ApiModelProperty(value = "设备类型码")
    private String deviceTypeCode;

    @ApiModelProperty(value = "设备类型描述")
    private String deviceTypeDescription;

    @ApiModelProperty(value = "页数")
    private Integer pageNum;

    @ApiModelProperty(value = "每页行数")
    private Integer pageSize;

    public Integer getPageNum() {
        if (pageNum == null) {
            pageNum = 1;
        }
        return pageNum;
    }

    public Integer getPageSize() {
        if (pageSize == null) {
            pageSize = 20;
        }
        /*if (pageSize > 100) {
            pageSize = 100;
        }*/
        return pageSize;
    }
}